package total;

import java.util.Scanner;

public class Ques1854 {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			long n = scan.nextInt();
			int k = scan.nextInt();
			long result = (n%4==0)?(n - n/4 +1):(n - n /4);
			System.out.println(result * 3);
		}
	}
}
